package main

import "fmt"

type student struct {
	Name string
	Age  int
}

func main() {
	m := make(map[string]*student)
	stus := []student{
		{Name: "zhou", Age: 24},
		{Name: "li", Age: 23},
		{Name: "wang", Age: 22},
	}
	for _, stu := range stus {
		stuCopy := stu
		// m[stu.Name] = &stu
		m[stu.Name] = &stuCopy
	}

	for _, v := range m {
		fmt.Printf("v=%v\n", v)
	}
}
